package com.ruoyi.order.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
import com.ruoyi.order.domain.BookReservationOrder;

/**
 * 预约借阅订单Mapper接口
 * 
 * @author ruoyi
 * @date 2024-10-28
 */
public interface BookReservationOrderMapper 
{
    /**
     * 查询预约借阅订单
     * 
     * @param orderId 预约借阅订单主键
     * @return 预约借阅订单
     */
    public BookReservationOrder selectBookReservationOrderByOrderId(Long orderId);

    /**
     * 查询预约借阅订单列表
     * 
     * @param bookReservationOrder 预约借阅订单
     * @return 预约借阅订单集合
     */
    public List<BookReservationOrder> selectBookReservationOrderList(BookReservationOrder bookReservationOrder);

    /**
     * 新增预约借阅订单
     * 
     * @param bookReservationOrder 预约借阅订单
     * @return 结果
     */
    public int insertBookReservationOrder(BookReservationOrder bookReservationOrder);

    /**
     * 修改预约借阅订单
     * 
     * @param bookReservationOrder 预约借阅订单
     * @return 结果
     */
    public int updateBookReservationOrder(BookReservationOrder bookReservationOrder);

    /**
     * 删除预约借阅订单
     * 
     * @param orderId 预约借阅订单主键
     * @return 结果
     */
    public int deleteBookReservationOrderByOrderId(Long orderId);

    /**
     * 批量删除预约借阅订单
     * 
     * @param orderIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteBookReservationOrderByOrderIds(Long[] orderIds);

    /**
     * 根据book_id查询预约借阅订单
     * @param bookId 书籍编号
     * @return BookReservationOrder对象
     */
    @Select("SELECT * FROM book_reservation_order WHERE book_id = #{bookId}")
    BookReservationOrder selectBookReservationOrderByBookId(@Param("bookId") Long bookId);
}
